package com.zzy.javaweb.zzy;

import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.io.PrintWriter;

@WebServlet(name = "xqServlet", value = "/xq-servlet")
public class Xq extends HttpServlet {
    private String message;

    public void init() {
        message = "张正阳 刘一飞 刘向阳 李金烁 赵怡龙 张保卫 吴蓓蓓 王志媛 杨明瑜 陈嘉政 于阔沛";
    }

    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
        response.setContentType("text/html");

        // Hello
        PrintWriter out = response.getWriter();
        out.println("<html><body>");
        out.println("<h1>" + message + "</h1>");
        out.println("</body></html>");
    }

    public void destroy() {
    }
}
